FROM mcr.microsoft.com/dotnet/core/sdk:3.0 as build-env
WORKDIR /code
COPY *.csproj /code
RUN dotnet restore

COPY . /code
RUN dotnet publish -c Release -o out

FROM mcr.microsoft.com/dotnet/core/aspnet:3.0 AS runtime
WORKDIR /app

COPY --from=build-env /code/out /app
ENTRYPOINT [ "dotnet","User.Api.dll"]
